import React, {Component} from 'react';

class App extends Component {
    submit1() {
        console.log("click1");
    }

    submit2 = () => {
        console.log("click2");
    }

    render() {
        return (<div>
            <input/>
            <button onClick={this.submit1}>提交</button>
            <button onClick={this.submit2}>提交</button>
            <button onClick={() => this.submit2()}>提交</button>
        </div>);
    }
}

export default App;